package com.fone.player.client;

import java.util.List;

import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.ElementList;
import org.simpleframework.xml.Root;

/**
 * @author 刘昆 (liukun@100tv.com)
 * @since 2014-04-22
 */

@Root(strict = false)
public class SeeRst extends Rst {
	
	@Root(strict = false)
	public static class Col {

		/** 栏目名称 */
		@Attribute (required = false)
		public String name;

		/** 栏目url */
		@Attribute (required = false)
		public String url;

		/** 内容列表 */
		@Element (required = false)
		public Cnts cnts;

		/** 分页 */
		@Element (required = false)
		public Rp rp;

		@Override
		public String toString() {
			return "Col [name=" + name + ", url=" + url + ", cnts=" + cnts
					+ ", rp=" + rp + "]";
		}

	}

	@Root(strict = false)
	public static class Cnts {

		@ElementList(inline = true, entry = "cnt", required = false)
		public List<Cnt> cntList;

		@Override
		public String toString() {
			return "Cnts [cntList=" + cntList + "]";
		}

	}

	@Root(strict = false)
	public static class Cnt {
		/** 内容显示名称 */
		@Attribute (required = false)
		public String name;

		/** 播放连接 */
		@Attribute (required = false)
		public String url;

		/** 用户昵称 */
		@Attribute (required = false)
		public String nickname;

		/** 大图地址，带时间戳 */
		@Attribute (required = false)
		public String pic1;

		/** 小图地址，带时间戳 */
		@Attribute (required = false)
		public String pic2;

		/** 来源 */
		@Attribute (required = false)
		public String comefrom;

		@Override
		public String toString() {
			return "Cnt [name=" + name + ", url=" + url + ", nickname="
					+ nickname + ", pic1=" + pic1 + ", pic2=" + pic2
					+ ", comefrom=" + comefrom + "]";
		}

	}

	@Root(strict = false)
	public static class Rp {
		/** 当前页码 */
		@Attribute (required = false)
		public int p;

		/** 总页数 */
		@Attribute (required = false)
		public int m;

		/** 下一页url */
		@Attribute (required = false)
		public String nurl;

		@Override
		public String toString() {
			return "Rp [p=" + p + ", m=" + m + ", nurl=" + nurl + "]";
		}

	}

	/** 服务器地址 */
	@Element (required = false)
	public String host;

	/** 资源服务器地址 */
	@Element (required = false)
	public String shost;

	/** 栏目 */
	@Element(required = false)
	public Col col;

	@Override
	public String toString() {
		return "SeeRst [host=" + host + ", shost=" + shost + ", col=" + col
				+ "]";
	}

}
